using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ActionButton : MonoBehaviour
{
    public KeyCode keyCode;
    public SlotHolder currentSlotHolder;

    private void Awake()
    {
        currentSlotHolder = GetComponent<SlotHolder>();
    }

    private void Update()
    {
        if (Input.GetKeyDown(keyCode) && (currentSlotHolder.itemUI.GetInventoryItem().itemData))
        {
            currentSlotHolder.UseItem();
        }
    }
}
